{include file="public/header" /}
<style>
    .padclass {
        padding: 0 10px
    }
</style>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body ">
                    <fieldset id="searchFieldset_currentTableRenderId" class="table-search-fieldset">
                        <legend>条件搜索</legend>
                        <form class="layui-form layui-form-pane form-search">
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">商家类型</label>
                                <div class="layui-input-inline">
                                    <select name="type">
                                        <option value="">商家类型</option>
                                        {foreach $types as $k => $v}
                                        {if $k != 1}
                                        <option value="{$k}" {if !empty(input('get.type')) &&
                                            input('get.type')==$k}selected{/if}>{$v|default=''}</option>
                                        {/if}
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">派单类型</label>
                                <div class="layui-input-inline">
                                    <select name="ordertype">
                                        <option value="">派单类型</option>
                                        {foreach $ordertype as $k => $v}
                                        <option value="{$k}" {if !empty(input('get.ordertype')) &&
                                            input('get.ordertype')==$k}selected{/if}>{$v|default=''}</option>
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">时间类型</label>
                                <div class="layui-input-inline">
                                    <select name="timestype" lay-verify="timessverify">
                                        <option value="">请选择时间查询类型</option>
                                        <option value="xcreated" {if !empty(input('get.timestype')) &&
                                            input('get.timestype')=='xcreated' }selected{/if}>选址派单时间</option>
                                        <option value="xtimes" {if !empty(input('get.timestype')) &&
                                            input('get.timestype')=='xtimes' }selected{/if}>选址需出发日期</option>
                                        <option value="created" {if !empty(input('get.timestype')) &&
                                            input('get.timestype')=='created' }selected{/if}>创建时间</option>
                                        <option value="kdates" {if !empty(input('get.timestype')) &&
                                            input('get.timestype')=='kdates' }selected{/if}>开业需出发日期</option>
                                        <option value="ycreated" {if !empty(input('get.timestype')) &&
                                            input('get.timestype')=='ycreated' }selected{/if}>开业指派时间</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">时间查询</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="timess" lay-verify="timestypeverify" name="timess"
                                        placeholder="时间段" value="{:input('get.timess')}" autocomplete="off"
                                        class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">业务经理</label>
                                <div class="layui-input-inline">
                                    <select name="yuid" lay-search="">
                                        <option value="">业务经理</option>
                                        {foreach $ylist as $k => $v}
                                        {if $v.del == 1}
                                        <option value="{$v.id}" {if !empty(input('get.yuid')) &&
                                            input('get.yuid')==$v.id}selected{/if}>{$v.account|default=''}{if $v.del !=
                                            1}账号已删除{/if}</option>
                                        {/if}
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">售后经理</label>
                                <div class="layui-input-inline">
                                    <select name="suid" lay-search="">
                                        <option value="">售后</option>
                                        {foreach $slist as $k => $v}
                                        {if $v.del == 1}
                                        <option value="{$v.id}" {if !empty(input('get.suid')) &&
                                            input('get.suid')==$v.id}selected{/if}>{$v.account|default=''}{if $v.del !=
                                            1}账号已删除{/if}</option>
                                        {/if}
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">主督导</label>
                                <div class="layui-input-inline">
                                    <select name="duid" lay-search="">
                                        <option value="">督导</option>
                                        {foreach $dlist as $k => $v}
                                        {if $v.del == 1}
                                        <option value="{$v.id}" {if !empty(input('get.duid')) &&
                                            input('get.duid')==$v.id}selected{/if}>{$v.account|default=''}{if $v.del !=
                                            1}账号已删除{/if}</option>
                                        {/if}
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">协选督导</label>
                                <div class="layui-input-inline">
                                    <select name="xxduid" lay-search="">
                                        <option value="">协选督导</option>
                                        {foreach $dlist as $k => $v}
                                        {if $v.del == 1}
                                        <option value="{$v.id}" {if !empty(input('get.xxduid')) &&
                                            input('get.xxduid')==$v.id}selected{/if}>{$v.account|default=''}{if $v.del
                                            !=
                                            1}账号已删除{/if}</option>
                                        {/if}
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">合同签约状态</label>
                                <div class="layui-input-inline">
                                    <select name="hetongtype">
                                        <option value="">合同签约状态</option>
                                        <option value="1" {if !empty(input('get.hetongtype')) &&
                                            input('get.hetongtype')==1}selected{/if}>纸质合同</option>
                                        <option value="2" {if !empty(input('get.hetongtype')) &&
                                            input('get.hetongtype')==2}selected{/if}>电子合同</option>
                                        <option value="3" {if !empty(input('get.hetongtype')) &&
                                            input('get.hetongtype')==3}selected{/if}>待签合同</option>
                                        <option value="4" {if !empty(input('get.hetongtype')) &&
                                            input('get.hetongtype')==4}selected{/if}>合同状态未知</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">尾款状态</label>
                                <div class="layui-input-inline">
                                    <select name="weikuan">
                                        <option value="">尾款状态</option>
                                        <option value="1" {if !empty(input('get.weikuan')) &&
                                            input('get.weikuan')==1}selected{/if}>未回款</option>
                                        <option value="2" {if !empty(input('get.weikuan')) &&
                                            input('get.weikuan')==2}selected{/if}>已回款</option>

                                        <option value="3" {if !empty(input('get.weikuan')) &&
                                            input('get.weikuan')==3}selected{/if}>全部回款</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">是否标记vip</label>
                                <div class="layui-input-inline">
                                    <select name="svip">
                                        <option value="">vip标记</option>
                                        <option value="1" {if !empty(input('get.svip')) &&
                                            input('get.svip')==1}selected{/if}>未标记</option>
                                        <option value="2" {if !empty(input('get.svip')) &&
                                            input('get.svip')==2}selected{/if}>已标记</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">装修状态</label>
                                <div class="layui-input-inline">
                                    <select name="zhuangxiu">
                                        <option value="">装修状态</option>
                                        <option value="1" {if !empty(input('get.zhuangxiu')) &&
                                            input('get.zhuangxiu')==1}selected{/if}>未装修</option>
                                        <option value="2" {if !empty(input('get.zhuangxiu')) &&
                                            input('get.zhuangxiu')==2}selected{/if}>装修中</option>
                                        <option value="3" {if !empty(input('get.zhuangxiu')) &&
                                            input('get.zhuangxiu')==3}selected{/if}>已装修</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">上货状态</label>
                                <div class="layui-input-inline">
                                    <select name="shanghuo	">
                                        <option value="">上货状态</option>
                                        <option value="1" {if !empty(input('get.shanghuo')) &&
                                            input('get.shanghuo')==1}selected{/if}>未上货</option>
                                        <option value="2" {if !empty(input('get.shanghuo')) &&
                                            input('get.shanghuo')==2}selected{/if}>已上货</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">货架安装状态</label>
                                <div class="layui-input-inline">
                                    <select name="huozhuang">
                                        <option value="">货架安装状态</option>
                                        <option value="1" {if !empty(input('get.huozhuang')) &&
                                            input('get.huozhuang')==1}selected{/if}>未发货</option>
                                        <option value="2" {if !empty(input('get.huozhuang')) &&
                                            input('get.huozhuang')==2}selected{/if}>已发货</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">首单状态</label>
                                <div class="layui-input-inline">
                                    <select name="isfirst">
                                        <option value="">首单状态</option>
                                        <option value="1" {if !empty(input('get.isfirst')) &&
                                            input('get.isfirst')==1}selected{/if}>未发货</option>
                                        <option value="2" {if !empty(input('get.isfirst')) &&
                                            input('get.isfirst')==2}selected{/if}>已发货</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">货架状态</label>
                                <div class="layui-input-inline">
                                    <select name="ishuo">
                                        <option value="">首单状态</option>
                                        <option value="1" {if !empty(input('get.ishuo')) &&
                                            input('get.ishuo')==1}selected{/if}>未发货</option>
                                        <option value="2" {if !empty(input('get.ishuo')) &&
                                            input('get.ishuo')==2}selected{/if}>已发货</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">新订单进程状态</label>
                                <div class="layui-input-inline">
                                    <select name="schedule">
                                        <option value="">新订单进程状态</option>
                                        {foreach $schedule_nav as $k => $y}
                                        <option value="{$k}" {if !empty(input('get.schedule')) &&
                                            input('get.schedule')==$k}selected{/if}>{$y}</option>
                                        {/foreach}
                                    </select>
                                </div>
                            </div>
                            <!-- <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">订单状态</label>
                                <div class="layui-input-inline">
                                    <select name="status">
                                        <option value="">旧订单状态</option>
                                        <option value="1" {if !empty(input('get.status')) &&
                                            input('get.status')==1}selected{/if}>营业中</option>
                                        <option value="2" {if !empty(input('get.status')) &&
                                            input('get.status')==2}selected{/if}>预备开业</option>
                                        <option value="3" {if !empty(input('get.status')) &&
                                            input('get.status')==3}selected{/if}>可选店面</option>
                                        <option value="4" {if !empty(input('get.status')) &&
                                            input('get.status')==4}selected{/if}>已取消</option>
                                        <option value="5" {if !empty(input('get.status')) &&
                                            input('get.status')==5}selected{/if}>已停业</option>
                                    </select>
                                </div>
                            </div> -->
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">选址出发待定</label>
                                <div class="layui-input-inline">
                                    <select name="xtimes">
                                        <option value="">选择状态</option>
                                        <option value="1" {if !empty(input('get.xtimes')) &&
                                            input('get.xtimes')==1}selected{/if}>待定</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">关键字</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="title" placeholder="商铺名称|备注|联系人|联系电话|地址"
                                        value="{:input('get.title')}" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <label class="layui-form-label">是否导出</label>
                                <div class="layui-input-inline">
                                    <select name="daochu">
                                        <option value="0">不选择</option>
                                        <option value="1" {if !empty(input('get.daochu')) &&
                                            input('get.daochu')==1}selected{/if}>导出excel</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-form-item layui-inline">
                                <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="sreach">搜索</button>
                            </div>
                        </form>
                    </fieldset>
                </div>
                <div class="layui-card-header">
                    <!--<button type="button" class="layui-btn layui-btn-sm" id="test1">-->
                    <!--     商家导入-->
                    <!--</button>-->
                    <button class="layui-btn layui-bg-cyan layui-btn-sm" onclick="open_add2('添加','shoplist_edit')"><i
                            class="layui-icon">&#xe654;</i>添加</button>&nbsp;
                    共有数据：<strong id="count">{$list->total()}</strong> 条
                </div>
                <div class="layui-table-body layui-table-main">
                    <table class="layui-table layui-form">
                        <thead>
                            <tr>
                                <th>
                                    <div class="padclass">ID</div>
                                </th>
                                {if $admin['type'] != 3}
                                <th width="20">置顶和标记
                                </th>
                                {/if}
                                <th width="100">
                                    订单类型|预估类型
                                </th>
                                <th width="200">
                                    <div class="padclass">选址|开业等日期</div>
                                </th>
                                <th width="150">订单类型/项目类型/添加人
                                </th>
                                <th>
                                    <div class="padclass">图纸</div>
                                </th>
                                <th width="150">
                                    <div class="padclass">发货信息</div>
                                </th>
                                <th style="width: 150px;">
                                    <div class="padclass">负责人信息</div>
                                </th>
                                <th style="width: 300px;">
                                    <div class="padclass">备注信息</div>
                                </th>
                                <th>
                                    <div class="padclass">商户信息</div>
                                </th>
                                <th>
                                    <div class="padclass">状态</div>
                                </th>
                                <th style="width: 100px;">
                                    <div class="padclass">商家地址</div>
                                </th>
                                <th>
                                    <div class="padclass">操作</div>
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            {foreach $list as $v}
                            <tr>
                                <td>
                                    <div class="padclass">{$v.id|default=''}</div>
                                </td>
                                {if $admin['type'] != 3}
                                <td>
                                    <a title="重置后可继续上次一次选址报销，不影响原有提交记录！"
                                        onclick="open_status(this, '/shop/shop_reimburs', '{$v.id}', 1)"
                                        href="javascript:;" class="layui-btn layui-btn-sm">
                                        选址报销入口重置
                                    </a>
                                    <a title="重置后可继续上次一次开业报销，不影响原有提交记录！"
                                        onclick="open_status(this, '/shop/shop_reimburs', '{$v.id}', 2)"
                                        href="javascript:;" class="layui-btn layui-btn-sm">
                                        开业报销入口重置
                                    </a>
                                    {if $v.luru == 1}
                                    <a title="确认已录入吗" onclick="open_status(this, '/shop/shop_status', '{$v.id}', 2)"
                                        href="javascript:;" class="layui-btn layui-btn-sm layui-bg-blue">
                                        未录入
                                    </a>
                                    {else}
                                    <a title="确认取消录入标记吗" onclick="open_status(this, '/shop/shop_status', '{$v.id}', 1)"
                                        href="javascript:;" class="layui-btn layui-btn-sm layui-bg-cyan">
                                        已录入
                                    </a>
                                    {/if}
                                    {if $v.svip == 2}
                                    <a title="确认取消VIP标记吗" onclick="open_status(this, '/shop/vip_status', '{$v.id}', 1)"
                                        href="javascript:;" class="layui-btn layui-btn-sm layui-bg-blue">
                                        取消VIP
                                    </a>
                                    {else}
                                    <a title="确认标记VIP吗"
                                        onclick="promt_alertss('请填写标记VIP标语', '/shop/vip_status', '{$v.id}', 2)"
                                        href="javascript:;" class="layui-btn layui-btn-sm layui-bg-cyan">
                                        标记VIP
                                    </a>
                                    {/if}
                                    <br />
                                    {if $v.istop == 1}
                                    <button type="button" class="layui-btn layui-btn-xs">否</button>
                                    {else}
                                    <button type="button" class="layui-btn layui-btn-xs layui-btn-danger">是</button>
                                    {/if}
                                </td>
                                {/if}
                                <td>
                                    {if $v.ordertype == 5}
                                    <div style="margin-bottom:10px"><button type="button"
                                            class="layui-btn layui-btn-xs layui-btn-danger">{$v.ordertype_text|default=''}</button>
                                        {if !empty($v.oldordertype) && $v.oldordertype != $v.ordertype &&
                                        !empty($v.oldordertype_text)}
                                        <button type="button"
                                            class="layui-btn layui-btn-xs">(原类型:{$v.oldordertype_text|default=''})</button>
                                        {/if}
                                    </div>
                                    {elseif $v.ordertype > 0}
                                    <div style="margin-bottom:10px"><button type="button"
                                            class="layui-btn layui-btn-xs">{$v.ordertype_text|default=''}</button></div>
                                    {/if}
                                    {if !empty($v.ytypes_text)}<div style="margin-bottom:10px"><button type="button"
                                            class="layui-btn  layui-btn-sm layui-bg-blue">{$v.ytypes_text|default=''}</button>
                                    </div>{/if}
                                    {if !empty($v.qktype_text)}<div style="margin-bottom:10px"><button type="button"
                                            class="layui-btn layui-btn-xs layui-btn-primary">{$v.qktype_text|default=''}</button>
                                    </div>{/if}
                                    {if !empty($v.ytypeslist_text)}<div style="margin-bottom:10px"><button type="button"
                                            class="layui-btn layui-btn-xs layui-bg-orange">{$v.ytypeslist_text|default=''}</button>
                                    </div>{/if}
                                    {if count($v.dplist) > 0}
                                    店铺参考:
                                    {foreach $v.dplist as $m}
                                    {if !empty($m.mianji) && !empty($m.address)}
                                    <div style="margin-bottom:10px">
                                        面积:{$m.mianji|default="0"}m²/地址:{$m.address|default="无"}/说明:{$m.text|default="无"}
                                    </div>{/if}
                                    {/foreach}
                                    {/if}
                                </td>
                                <td>
                                    <div class="layui-table-cell">选址需出发日期:<span {if
                                            empty($v.xtimes)}style="font-size: 24px;color:red;font-weight:bold;"
                                            {else}style="font-size: 18px;color:red"
                                            {/if}>{$v.xtimes|default='待定'}</span></div>
                                    <div class="padclass">开业需出发日期:{$v.kdates|default='无'}</div>
                                    <div class="padclass">开业日期:{$v.times|default='无'}</div>
                                    <div class="padclass">选址指派时间:{$v.xcreated|default='无'}</div>
                                    <div class="padclass">开业指派时间:{$v.ycreated|default='无'}</div>
                                    {if !empty($v.firsttimes)}
                                    <div class="padclass">首单发货日期:{$v.firsttimes|default='无'}</div>
                                    {/if}
                                    <div class="padclass">创建时间:{$v.created|default='无'}</div>
                                </td>
                                <td>
                                    <div class="padclass">
                                        {if $v.old == 1}
                                        <button type="button" class="layui-btn layui-btn-xs">旧订单</button>
                                        {elseif $v.old == 2}
                                        <button type="button"
                                            class="layui-btn layui-btn-xs layui-bg-orange">新订单</button>
                                        {else}
                                        <button type="button"
                                            class="layui-btn layui-btn-xs layui-btn-normal">旧转新订单</button>
                                        {/if}
                                    </div>
                                    <div class="padclass">{$v.type|default=''}</div>
                                    <div class="padclass">{$v.user_name|default=''}</div>
                                </td>
                                <td>
                                    <div style="height: 200px;overflow-y: scroll;">
                                        {if count($v.images) > 0}
                                        选址图纸:
                                        <div id="layer-photos-demo" class="layer-photos-demo">
                                            {foreach $v.images as $m}
                                            <img height="20" layer-pid="" layer-src="{$m.url}"
                                                src="{$m.url}?x-oss-process=image/resize,h_50" />
                                            {/foreach}
                                        </div>
                                        {/if}
                                        {if count($v.images9) > 0}
                                        选址回执单:
                                        <div id="layer-photos-demo" class="layer-photos-demo">
                                            {foreach $v.images9 as $m}
                                            <img height="20" layer-pid="" layer-src="{$m.url}"
                                                src="{$m.url}?x-oss-process=image/resize,h_50" />
                                            {/foreach}
                                        </div>
                                        {/if}
                                        {if count($v.images5) > 0}
                                        尾款回款凭证:
                                        <div id="layer-photos-demo" class="layer-photos-demo">
                                            {foreach $v.images5 as $m}
                                            <img height="20" layer-pid="" layer-src="{$m.url}"
                                                src="{$m.url}?x-oss-process=image/resize,h_50" />
                                            {/foreach}
                                        </div>
                                        {/if}
                                        {if count($v.images2) > 0}
                                        开业回执单:
                                        <div id="layer-photos-demo" class="layer-photos-demo">
                                            {foreach $v.images2 as $m}
                                            <img height="20" layer-pid="" layer-src="{$m.url}"
                                                src="{$m.url}?x-oss-process=image/resize,h_50" />
                                            {/foreach}
                                        </div>
                                        {/if}
                                        {if count($v.images1) > 0}
                                        设计图纸:
                                        <div id="layer-photos-demo" class="layer-photos-demo">
                                            {foreach $v.images1 as $m}
                                            <img height="20" layer-pid="" layer-src="{$m.url}"
                                                src="{$m.url}?x-oss-process=image/resize,h_50" />
                                            {/foreach}
                                        </div>
                                        {/if}
                                        {if count($v.images6) > 0}
                                        合同照片:
                                        <div id="layer-photos-demo" class="layer-photos-demo">
                                            {foreach $v.images6 as $m}
                                            <img height="20" layer-pid="" layer-src="{$m.url}"
                                                src="{$m.url}?x-oss-process=image/resize,h_50" />
                                            {/foreach}
                                        </div>
                                        {/if}
                                        {if count($v.images7) > 0}
                                        业务经理确认:
                                        <div id="layer-photos-demo" class="layer-photos-demo">
                                            {foreach $v.images7 as $m}
                                            <img height="20" layer-pid="" layer-src="{$m.url}"
                                                src="{$m.url}?x-oss-process=image/resize,h_50" />
                                            {/foreach}
                                        </div>
                                        {/if}
                                        {if count($v.images4) > 0}
                                        选址现场/门头正面照:
                                        <div id="layer-photos-demo" class="layer-photos-demo">
                                            {foreach $v.images4 as $m}
                                            <img height="20" layer-pid="" layer-src="{$m.url}"
                                                src="{$m.url}?x-oss-process=image/resize,h_50" />
                                            {/foreach}
                                        </div>
                                        {/if}
                                        {if count($v.images10) > 0}
                                        选址现场/店内照:
                                        <div id="layer-photos-demo" class="layer-photos-demo">
                                            {foreach $v.images10 as $m}
                                            <img height="20" layer-pid="" layer-src="{$m.url}"
                                                src="{$m.url}?x-oss-process=image/resize,h_50" />
                                            {/foreach}
                                        </div>
                                        {/if}
                                        {if count($v.images11) > 0}
                                        房产证明图片:
                                        <div id="layer-photos-demo" class="layer-photos-demo">
                                            {foreach $v.images11 as $m}
                                            <img height="20" layer-pid="" layer-src="{$m.url}"
                                                src="{$m.url}?x-oss-process=image/resize,h_50" />
                                            {/foreach}
                                        </div>
                                        {/if}
                                        {if count($v.video1) > 0}
                                        选址现场/店内解析视频:
                                        <div>
                                            {foreach $v.video1 as $k => $m}
                                            <div style="display: inline-block;background-color: aquamarine;"
                                                onclick="previewVideo('{$m.url}')">查看视频{$k + 1}</div>
                                            {/foreach}
                                        </div>
                                        {/if}
                                        {if count($v.images2) > 0}
                                        回执单:
                                        <div id="layer-photos-demo" class="layer-photos-demo">
                                            {foreach $v.images2 as $m}
                                            <img height="20" layer-pid="" layer-src="{$m.url}"
                                                src="{$m.url}?x-oss-process=image/resize,h_50" />
                                            {/foreach}
                                        </div>
                                        {/if}
                                        {if count($v.images3) > 0}
                                        现场开业照片:
                                        <div id="layer-photos-demo" class="layer-photos-demo">
                                            {foreach $v.images3 as $m}
                                            <img height="20" layer-pid="" layer-src="{$m.url}"
                                                src="{$m.url}?x-oss-process=image/resize,h_50" />
                                            {/foreach}
                                        </div>
                                        {/if}
                                        {if count($v.video) > 0}
                                        现场开业视频:
                                        <div>
                                            {foreach $v.video as $k => $m}
                                            <div style="display: inline-block;background-color: aquamarine;"
                                                onclick="previewVideo('{$m.url}')">查看视频{$k + 1}</div>
                                            {/foreach}
                                        </div>
                                        {/if}
                                    </div>
                                </td>
                                <td>
                                    {if !empty($v.iswang)}
                                    <div class="padclass">{if $v.iswang == 1}<span
                                            style="color:red;">是否网签:是</span>{elseif $v.iswang ==
                                        2}是否网签:否{/if}</div>
                                    {/if}
                                    {if !empty($v.canyyzz)}
                                    <div class="padclass">咨询可否办理营业执照:{if $v.canyyzz == 1}能{elseif $v.canyyzz ==
                                        2}否{/if}</div>
                                    {/if}
                                    {if !empty($v.mianji)}
                                    <div class="padclass">面积说明:{if $v.mianji == 1}低于60m²{elseif $v.mianji ==
                                        2}60-80m²{elseif $v.mianji == 3}80m²及以上{/if}</div>
                                    {/if}
                                    {if !empty($v.zongshu)}
                                    <div class="padclass" style="color: red;">告知开店总数:{$v.zongshu}</div>
                                    {/if}
                                    {if !empty($v.maoli)}
                                    <div class="padclass" style="color: red;">告知开店毛利:{$v.maoli}</div>
                                    {/if}
                                    {if !empty($v.htqdy)}
                                    <div class="padclass" style="color: red;">合同签订人:{$v.htqdy}</div>
                                    {/if}
                                    {if $v.storetype == 1}
                                    <div class="padclass" style="color: red;">自有店面</div>
                                    {elseif $v.storetype == 2}
                                    <div class="padclass">店面已付定金</div>
                                    {elseif $v.storetype == 3}
                                    <div class="padclass">店面已付租金</div>
                                    {elseif $v.storetype == 4}
                                    <div class="padclass">店面确认约定</div>
                                    {else}
                                    {/if}
                                    {if $v.hetongtype == 1}<div class="padclass" style="color: red;">纸质合同</div>
                                    {elseif $v.hetongtype == 2}<div class="padclass" style="color: green;">电子合同</div>
                                    {elseif $v.hetongtype ==
                                    3}<div class="padclass">待签合同</div>{else}<div class="padclass">合同未知</div>{/if}
                                    {if $v.shanghuo == 2}<div class="padclass" style="color: red;">开业已上货</div>
                                    {else}<div class="padclass">开业未上货</div>{/if}
                                    {if $v.huozhuang == 2}<div class="padclass" style="color: red;">货架已安装</div>
                                    {else}<div class="padclass">货架未安装</div>{/if}
                                    {if $v.zhuangxiu == 3}<div class="padclass" style="color: red;">店面已装修</div>
                                    {elseif $v.zhuangxiu
                                    == 2}<div class="padclass" style="color: blue;">店面装修中</div>{else}<div
                                        class="padclass">
                                        店面未装修</div>{/if}
                                    {if $v.weikuan == 3}<div class="padclass" style="color: red;">尾款全部回款</div>
                                    {elseif $v.weikuan ==
                                    2}<div class="padclass" style="color: blue;">店面部分回款</div>{else}<div
                                        class="padclass">
                                        尾款未回款</div>{/if}
                                    {if $v.isfirst == 2}<div class="padclass" style="color: red;">首单已发货</div>
                                    {else}<div class="padclass">首单未发货</div>{/if}
                                    {if $v.ishuo == 2}<div class="padclass" style="color: red;">货架已发货</div>
                                    {else}<div class="padclass">货架未发货</div>{/if}
                                </td>
                                <td>
                                    <div class="padclass">
                                        业务:{$v.yewu|default='无'}
                                        {if !empty($v.yewu)}
                                        <a title="通知"
                                            onclick="promt_alert('填写通知内容','/shop/sendmessage','{$v.id}','{$v.yuid}')"
                                            href="javascript:;" class="layui-btn layui-btn-sm">
                                            通知
                                        </a>
                                        {/if}
                                    </div>
                                    <div class="padclass" {if $v.duid> 0}
                                        style="color:red"{/if}>选址督导:{$v.dudao|default='无'}
                                        {if !empty($v.dudao)}
                                        <a title="通知"
                                            onclick="promt_alert('填写通知内容','/shop/sendmessage','{$v.id}','{$v.duid}')"
                                            href="javascript:;" class="layui-btn layui-btn-sm">
                                            通知
                                        </a>
                                        {/if}
                                    </div>
                                    <div class="padclass">
                                        {if count($v.xxlist) > 0}
                                        {foreach $v.xxlist as $xk => $xv}
                                        协选:{$xv.account|default='无'}
                                        <a title="通知"
                                            onclick="promt_alert('填写通知内容','/shop/sendmessage','{$v.id}','{$xv.id}')"
                                            href="javascript:;" class="layui-btn layui-btn-sm">
                                            通知
                                        </a><br />
                                        {/foreach}
                                        {/if}
                                    </div>
                                    <div class="padclass">售后:{$v.shouhuo|default='无'}
                                        {if !empty($v.shouhuo)}
                                        <a title="通知"
                                            onclick="promt_alert('填写通知内容','/shop/sendmessage','{$v.id}','{$v.suid}')"
                                            href="javascript:;" class="layui-btn layui-btn-sm">
                                            通知
                                        </a>
                                        {/if}
                                    </div>
                                    <div class="padclass" {if $v.kuid> 0}
                                        style="color:blue"{/if}>开业督导:{$v.kaiye|default='无'}
                                        {if !empty($v.kaiye)}
                                        <a title="通知"
                                            onclick="promt_alert('填写通知内容','/shop/sendmessage','{$v.id}','{$v.kuid}')"
                                            href="javascript:;" class="layui-btn layui-btn-sm">
                                            通知
                                        </a>
                                        {/if}
                                    </div>
                                </td>
                                <td style="max-width: 250px;">
                                    {if !empty($v.areas)}派单区域:{$v.areas|default='无'}<br />{/if}
                                    {if !empty($v.xremark)}派单备注:{$v.xremark|default='无'}<br />{/if}
                                    {if !empty($v.yremark)}业务备注:{$v.yremark|default='无'}<br />{/if}
                                    {if !empty($v.dremark)}选址备注:{$v.dremark|default='无'}<br />{/if}
                                    {if !empty($v.sremark)}售后备注:{$v.sremark|default='无'}<br />{/if}
                                    {if !empty($v.sremark)}开业备注:{$v.kremark|default='无'}<br />{/if}
                                    {if !empty($v.kdates)}选址督导出发日期:{$v.xtimes|default='无'}<br />{/if}
                                    {if !empty($v.kdates)}开业督导出发日期:{$v.kdates|default='无'}<br />{/if}
                                    {if !empty($v.givermeark)}开业派单备注:{$v.givermeark|default='无'}<br />{/if}
                                    {if !empty($v.hk_text)}<span
                                        style="color: red;">回款说明:{$v.hk_text|default='无'}</span>{/if}
                                </td>
                                <td>
                                    <div style="font-size: 18px;color: red;">

                                    </div>
                                    <div class="padclass">第1联系人:{$v.name|default='无'}</div>
                                    <div class="padclass">{$v.phone|default='无'}</div>
                                    {if !empty($v.name2)}<div class="padclass">第2联系人:{$v.name2|default='无'}</div>{/if}
                                    {if !empty($v.phone2)}<div class="padclass">{$v.phone2|default='无'}</div>{/if}
                                    {if !empty($v.htqdr)}<div class="padclass">合同签订人:{$v.htqdr|default='无'}</div>
                                    {/if}
                                    {if !empty($v.mobile)}<div class="padclass">收银机编码/员工号:{$v.mobile|default='无'}</div>
                                    {/if}
                                    {foreach $v.sginfo as $sgkey => $sginfo}
                                    {if !empty($sginfo['mobile'])}
                                    <div class="padclass">水柜第{$sgkey +
                                        1}联系人:{$sginfo.name|default='无'}({$sginfo.mobile|default='无'})</div>
                                    <div class="padclass"></div>
                                    {/if}
                                    {/foreach}
                                </td>
                                <td>
                                    {if $v.schedule < 8 && $v.bicloses==1} <a title="发起闭店调查"
                                        onclick="open_status(this, '/shop/bi_status', '{$v.id}', 2)" href="javascript:;"
                                        class="layui-btn layui-btn-sm layui-bg-green">
                                        闭店调查
                                        </a>
                                        {elseif $v.schedule < 8 && $v.bicloses==2}
                                        <a title="取消闭店调查" onclick="open_status(this, '/shop/bi_status', '{$v.id}', 3)"
                                            href="javascript:;" class="layui-btn layui-btn-sm layui-bg-error">
                                            取消闭店调查
                                        </a>
                                        {/if}
                                        {if $v.schedule < 8} <a title="闭店后订单状态会发生修改且不可撤回，请谨慎操作"
                                            onclick="open_status(this, '/shop/bi_status', '{$v.id}', 1)"
                                            href="javascript:;" class="layui-btn layui-btn-sm layui-bg-blue">
                                            直接闭店
                                            </a>
                                            {/if}
                                            {if $v.old >= 2}
                                            {$v.schedule_text|default='无'}
                                            ({$v.schedule_text2|default='无'})
                                            {else}
                                            {if $v.status == 1}<div class="padclass">营业中</div>{/if}
                                            {if $v.status == 2}<div class="padclass">预备开业</div>{/if}
                                            {if $v.status == 3}<div class="padclass">可选店面</div>{/if}
                                            {if $v.status == 5}<div class="padclass">已停业</div>{/if}
                                            {/if}
                                </td>
                                <td>
                                    {$v.address|default='无'}({$v.getaddress|default='无'})
                                </td>
                                {if $admin['type'] != 3}
                                <td class="td-manage">
                                    {if $v.qktype == 1 && $v.qkqueren == 1}
                                    <a title="审核通过，订单不变"
                                        onclick="open_status(this, '/shop/dingjin_status', '{$v.id}', 2)"
                                        href="javascript:;" class="layui-btn layui-btn-sm layui-bg-blue">
                                        0定金确认
                                    </a>
                                    {/if}
                                    {if $v.weikuanstatus == 2}
                                    <a title="审核通过，订单不变"
                                        onclick="open_status(this, '/shop/weikuans_status', '{$v.id}', 1)"
                                        href="javascript:;" class="layui-btn layui-btn-sm layui-bg-blue">
                                        回款审核通过
                                    </a>
                                    <a title="审核驳回，状态还原"
                                        onclick="open_status(this, '/shop/weikuans_status', '{$v.id}', 3)"
                                        href="javascript:;" class="layui-btn layui-btn-sm layui-bg-cyan">
                                        回款审核驳回
                                    </a>
                                    {/if}
                                    {if $v.isshenhe == 2}
                                    <a title="确认地址无误，订单进入装修状态"
                                        onclick="open_status(this, '/shop/store_status', '{$v.id}', 1)"
                                        href="javascript:;" class="layui-btn layui-btn-sm layui-bg-blue">
                                        选址通过
                                    </a>
                                    <a title="确认地址无效，订单状态不变"
                                        onclick="open_status(this, '/shop/store_status', '{$v.id}', 3)"
                                        href="javascript:;" class="layui-btn layui-btn-sm layui-bg-cyan">
                                        选址驳回
                                    </a>
                                    {/if}
                                    <div class="padclass">
                                        <a title="操作" onclick="open_add2('操作','/shop/shoplist_edit?id={$v.id}')"
                                            href="javascript:;" class="layui-btn layui-btn-sm">
                                            操作
                                        </a>
                                    </div>
                                    <div class="padclass">
                                        <a title="操作" onclick="open_add2('操作','/shop/shoplist_edit2?id={$v.id}')"
                                            href="javascript:;" class="layui-btn layui-btn-sm layui-bg-blue">
                                            发布二次任务
                                        </a>
                                    </div>
                                    {if !empty($v.backdata) && count($v.backdata) > 0}
                                    <div class="padclass">
                                        <a title="选址备份数据" onclick="open_add2('选址备份数据','/shop/shoplist_back?id={$v.id}')"
                                            href="javascript:;" class="layui-btn layui-btn-danger layui-btn-sm">
                                            选址备份
                                        </a>
                                    </div>
                                    {/if}
                                </td>
                                {else}
                                <td>
                                    {switch name="v.weikuan"}
                                    {case value="1"}
                                    <div class="padclass"><a title="确认部分回款"
                                            onclick="open_status(this, '/shop/weikuan_status', '{$v.id}', 2,'当前状态未回款，确认部分回款')"
                                            href="javascript:;" class="layui-btn layui-btn-sm layui-bg-blue">
                                            确认部分回款
                                        </a>
                                    </div>
                                    <div class="padclass" style="margin-top: 10px;">
                                        <a title="确认全部回款"
                                            onclick="open_status(this, '/shop/weikuan_status', '{$v.id}', 3,'当前状态未回款，确认全部回款')"
                                            href="javascript:;" class="layui-btn layui-btn-sm">
                                            确认全部回款
                                        </a>
                                    </div>
                                    {/case}
                                    {case value="2"}
                                    <a title="确认全部回款"
                                        onclick="open_status(this, '/shop/weikuan_status', '{$v.id}', 3,'当前状态部分回款，确认全部回款')"
                                        href="javascript:;" class="layui-btn layui-btn-sm">
                                        确认全部回款
                                    </a>
                                    {/case}
                                    {default /}已全部回款
                                    {/switch}
                                    {/if}
                                </td>
                            </tr>
                            {/foreach}

                        </tbody>
                    </table>
                </div>
                <div class="layui-card-body ">
                    <div class="page">
                        {$list->render()|raw}
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
</body>
{include file="public/footer"}
<script>
    layui.use(['layer', 'jquery', 'form', 'laydate', 'upload'], function () {
        var $ = layui.jquery
        var laydate = layui.laydate
        var upload = layui.upload;
        var form = layui.form;
        laydate.render({
            elem: '#timess'
            , type: 'date'
            , range: '~'
        });
        form.verify({
            timessverify: function (value, item) {
                var times = $("input[name='timess']").val();
                if (times && !value) {
                    return '请选择时间查询类型或清除时间';
                }
            },
            timestypeverify: function (value, item) {
                var timestype = $("select[name='timestype']").val();
                if (timestype && !value) {
                    return '请填写时间查询范围或清除时间类型';
                }
            }
        });
        //执行实例
        var uploadInst = upload.render({
            elem: '#test1' //绑定元素
            , accept: 'file'
            , url: '/shop/import_batch_send' //上传接口
            , before: function (obj) { //obj参数包含的信息，跟 choose回调完全一致，可参见上文。
                layer.load(); //上传loading
            }, done: function (res) {
                layer.closeAll('loading'); //关闭loading
                //如果上传失败
                if (res.status == 0) {
                    str = '导入完成，失败个数' + res.data.length + '<br/>';
                    $.each(res.data, function (i, obj) {
                        str += '<div>第' + obj.key + '行:' + obj.msg + '</div>';
                    });
                    layer.open({
                        type: 0,
                        content: str,
                        yes: function () {
                            location.reload();
                        }
                    });
                    return false;
                } else {
                    layer.msg(res.msg, { icon: 2, time: 1000 });
                    return false;
                }
            }
            , error: function () {
                layer.closeAll('loading'); //关闭loading
                layer.msg('请求失败请重试', { icon: 2, time: 1000 });
                return false;

            }
        });
    });
</script>
<script>
    //视频预览，传url,width,height
    function previewVideo(url, width, height) {
        console.log(url);
        width = width ? width : '65%';
        height = height ? height : '65%';
        let content = '<video width="100%" height="90%"  controls="controls" autobuffer="autobuffer"  autoplay="autoplay" loop="loop">' +
            '<source src="' + url + '" type="video/mp4"></source></video>';
        layer.open({
            type: 1,
            maxmin: true, //打开放大缩小按钮
            title: '视频播放',
            area: [width, height],
            content: content,
        });
    }
    function money_edit(title, url, id) {
        layer.prompt({
            formType: 0,
            value: 0,
            title: title,
        }, function (value, index, elem) {
            $.ajax({
                type: 'post',
                url: url,
                data: { id: id, money: value },
                success: function (res) {
                    if (res.code == 0) {
                        layer.msg(res.msg, { icon: 6, time: 1000 }, function () {
                            layer.close(index);
                            // 获得frame索引
                            location.reload();
                        });
                    } else {
                        layer.msg(res.msg, { icon: 2, time: 1000 });
                    }
                }
            });
            return false;

        });
    }
    layui.use(['form', 'upload'], function () {
        var $ = layui.jquery
            , form = layui.form
            , layer = layui.layer;
    });
</script>
<script>
    layer.photos({
        photos: '#layer-photos'
        , anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
    });
</script>